package org.example.java.base;

import java.io.IOException;
import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * User: ZhangJuntao
 * Date: 13-3-3
 * Time: 下午8:33
 */
public class RandomTest {
  public static void main(String[] args) throws IOException {
    //相同种子 相同顺序的值不变
    Random d = new Random(1);
    Random d1 = new Random(1);
    Random d2 = new Random(100);
    Random d3 = new Random();

    System.out.println(d.nextInt(250 * 5));
    System.out.println(d1.nextInt(250 * 5));
    System.out.println(d.nextInt());
    System.out.println(d1.nextInt());
    System.out.println(d2.nextInt(250 * 5));
    System.out.println(d3.nextInt(100));
    System.out.println(d3.nextInt(100));
  }
}
